import { http } from '@/utils/request'
import type { IReqAttrParams, resAttrValueList, ReqApifoxModel } from '@/types/attr'
/**
 * @description 获取属性列表
 * @param params
 */
export const reqGetAttrList = (params: IReqAttrParams) => {
  return http<resAttrValueList[]>(
    `/admin/product/attrInfoList/${params.category1Id}/${params.category2Id}/${params.category3Id}`,
    'GET'
  )
}
/**
 * @description 添加修改平台属性
 * @param data
 */
export const reqAddEditAttr = (data: ReqApifoxModel) => {
  return http('/admin/product/saveAttrInfo', 'POST', data)
}
/**
 * @description 删除平台属性
 * @param id
 */
export const reqDeleteAttr = (id: number) => {
  return http(`/admin/product/deleteAttr/${id}`, 'DELETE')
}
